package scm.erp.core.auth;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;

import jakarta.servlet.http.HttpServletRequest;
import java.time.LocalDateTime;
import java.util.List;

@Slf4j
@Data
public class LoginSession {
    private String accountName;
    private String userName;
    private LocalDateTime loginTime;
    private List<String> roles;
    private List<String> permissions;


    public LoginSession setThreadLocal() {
        return SSOContext.set(this);
    }

    public static LoginSession resolve(HttpServletRequest request) {
        return new LoginSession();
    }

}
